const { Schema, model } = require('mongoose');
const testedSchema = new Schema({
    studentId: { // 所属学员 _id
        type: Schema.Types.ObjectId,
        ref: 'studentsModel'
    },
    testId: { // 关联试卷 _id
        type: Schema.Types.ObjectId,
        ref: 'testsModel'
    },
    score: String, // 成绩
    time:String, //存储考试时
    testeScore: String,//试卷总分
    studentOption:Array //用户答案

}, { versionKey: false });
//2.设置数据模型，同时连接数据集合
module.exports.testedModel = model('testedModel', testedSchema, 'tested');